/***************************************************************************
 *   Copyleft 2006-2007 by												   *
 *	 Iwanicki Krzysztof													   *
 *   <gamma.mini.pw.edu.pl/~iwanickik>			                           *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 ***************************************************************************/
#ifndef __MAINWINDOW_H__
#define __MAINWINDOW_H__

#ifdef _WIN32_WINNT
#undef _WIN32_WINNT
#endif
#define _WIN32_WINNT 0x0500


#include <list>
#include <limits.h>
#include "../resource.h"
#include "./AbstractWindow.h"
#include "../Types/Types.h"
#include "../Framework/Output/XMLSerializer.h"

#define WINDOW_NAME			L"CAD/CAM"
#define WINDOW_TITLE		L"CAD/CAM"



class MainWindow : public AbstractWindow {
public:
    MainWindow(HINSTANCE hInstance);

    cVoid Render();
	cVoid OnChangeEyeColor(cUShort cmd);
	cVoid OnChangeControl(cUShort cmd);
    cVoid OnShowHideAxis(cUShort cmd);
	cVoid OnAddObject(cUShort cmd);
	cVoid OnAddObjectMenu(cUShort cmd, Object3D* object);
	cVoid OnDeleteObject(cUShort cmd);
protected:

	virtual LRESULT CALLBACK WndProc(HWND hwnd, cUInt message, WPARAM wParam, LPARAM lParam);
    cVoid OnCommand(HWND hwnd, WPARAM wParam, LPARAM lParam);
    cVoid OnMouseMove(HWND hwnd, WPARAM wParam, LPARAM lParam);
    cVoid OnMouseWheel(HWND hwnd, WPARAM wParam, LPARAM lParam);
    cVoid OnLeftMouseDown(HWND hwnd, WPARAM wParam, LPARAM lParam);
    cVoid OnRightMouseDown(HWND hwnd, WPARAM wParam, LPARAM lParam);
    cVoid OnLeftMouseUp(HWND hwnd, WPARAM wParam, LPARAM lParam);
    cVoid OnRightMouseUp(HWND hwnd, WPARAM wParam, LPARAM lParam);
    cVoid OnKeyUp(HWND hwnd, WPARAM wParam, LPARAM lParam);
	cVoid OnKeyDown(HWND hwnd, WPARAM wParam, LPARAM lParam);
	cVoid SaveScene();
	cVoid LoadScene();
};

#endif
